package com.labManage.dao;

import com.labManage.controller.BorrowController;
import com.labManage.entity.BorrowInfo;
import com.labManage.entity.User;
import com.labManage.vo.BorrowInfoVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BorrowInfoDao {

    public List<BorrowInfo> selectBorrowInfoLimit(@Param("startIndex")Integer startIndex,
                                                  @Param("limit")Integer limit,
                                                  @Param("borrowPersonId") Long borrowPersonId);

    long selectBorrowNum();

    User selectBorrowUserByGoodsId(@Param("borrowGoodsId") Long borrowGoodsId);

    BorrowInfo selectBorrowInfoByGoodsIdAndBorrowPersonId(@Param("goodsId") Long goodsId,@Param("borrowPersonId") Long borrowPersonId);

    int insertBorrowInfo(BorrowInfo borrowInfo);

    int updateBorrowInfo(BorrowInfo updateBorrowInfo);

    BorrowInfo selectBorrowInfoById(Long borrowId);

    long selectBorrowInfoNum(@Param("borrowPersonId")Long borrowPersonId);

    int deteteBorrowInfoById(Long id);

    List<BorrowInfo> selectBorrowInfoByGoodsId(Long id);

    int deteteBorrowInfoByGoodsId(Long id);

    List<BorrowInfo> selectBorrowInfoByBorrowPersonId(Long id);

    List<BorrowInfo> selectBorrowInfo();
}
